@if($user->hasRole('User')&&!$user->hasRole('Loaner'))
	<!-- 如果是一个机构用户 -->
	@if($user->hasRole('OperatingPlatform') || $user->hasRole('GuaranteeAgency') || $user->hasRole('MarketingAgency'))
		<li class="{{ $menu==1?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@center',['menu'=>1]) }}">资产总览</a></li>
		<li class="{{ $menu==2?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@gift',['type' =>0 ,'menu'=>2]) }}">红包查询</a></li>
		<li class="{{ $menu==5?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@rechargeRecord',['menu'=>5]) }}">交易记录</a></li>
		<li class="{{ $menu==6?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@generationCollection',['menu'=>6]) }}">收款明细</a></li>
		<li class="{{ $menu==12?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@investmentProjects',['type'=>0,'menu'=>12]) }}">投资项目</a></li>
		<li class="{{ $menu==3?'active':'' }}"><a href="{{ action('MessageController@index',['type' => 0,'menu'=>3]) }}">站内信</a></li>
	@else
		<!-- 投资人菜单 -->
		<li class="{{ $menu==1?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@center',['menu'=>1]) }}">资产总览</a></li>
		<li class="{{ $menu==0?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@index',['menu'=>0]) }}">账户设置</a></li>
		<li class="{{ $menu==2?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@gift',['type' =>0 ,'menu'=>2]) }}">红包查询</a></li>
		<li class="{{ $menu==5?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@rechargeRecord',['menu'=>5]) }}">交易记录</a></li>
		<li class="{{ $menu==6?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@generationCollection',['menu'=>6]) }}">收款明细</a></li>
		<li class="{{ $menu==12?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@investmentProjects',['type'=>0,'menu'=>12]) }}">投资项目</a></li>
		<li class="{{ $menu==3?'active':'' }}"><a href="{{ action('MessageController@index',['type' => 0,'menu'=>3]) }}">站内信</a></li>
		<li class="{{ $menu==4?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@invitation',['menu'=>4]) }}">邀请有礼</a></li>
	@endif
<!-- 二级经纪人 -->
@if(!empty($user->userInfo->second_broker_code) && ($user->userInfo->second_broker_code == $user->userInfo->invite_code))
	<br/>
	<li class="{{ $menu==8?'active':'' }}"><a href="{{ action('UserCenter\AgentController@customerManagement',['menu'=>8]) }}">客户管理</a></li>
	<li class="{{ $menu==10?'active':'' }}"><a href="{{ action('UserCenter\AgentController@businessManager',['menu'=>10]) }}">业务管理</a></li>	
@endif

@endif

@if($user->hasRole('Loaner'))
<br/>
	<!-- 融资人菜单 -->
<li class="{{ $menu==1?'active':'' }}"><a href="{{ action('UserCenter\LoanerController@index',['menu'=>1]) }}">融资总览</a></li>
<li class="{{ $menu==0?'active':'' }}"><a href="{{ action('UserCenter\UserCenterController@index',['menu'=>0]) }}">账户设置</a></li>
<!-- <li class="{{ $menu==14?'active':'' }}"><a href="{{ action('UserCenter\LoanerController@financingManagement',['menu'=>14]) }}">融资管理</a></li> -->
<li class="{{ $menu==13?'active':'' }}"><a href="{{ action('UserCenter\LoanerController@pendingRepayment',['menu'=>13]) }}">还款明细</a></li>
@endif

@if($user->hasRole('Agent'))
<br/>
<li class="{{ $menu==15?'active':'' }}"><a href="{{ action('UserCenter\AgentController@nextAgent',['menu'=>15]) }}">经纪人管理</a></li>
<li class="{{ $menu==8?'active':'' }}"><a href="{{ action('UserCenter\AgentController@customerManagement',['menu'=>8]) }}">客户管理</a></li>
<li class="{{ $menu==10?'active':'' }}"><a href="{{ action('UserCenter\AgentController@businessManager',['menu'=>10]) }}">业务管理</a></li>
@endif

@if($user->hasRole('MarketingAgency'))
<br/>
	//运营平台
@endif

@if($user->hasRole('GuaranteeAgency'))
<br/>
	<li class="{{ $menu==11?'active':'' }}"><a href="{{ action('UserCenter\GuaranteeController@index',['menu'=>11]) }}">担保管理</a></li>
@endif
